home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-29 | 917 b | 38 lines | [TEXT/ttxt] |
- --<<<
- format debug "-- Compiling ClockToggle Class . . .\n" undefined undefined
-
- class ClockToggle(Toggle)
- end
-
- method init self {class ClockToggle} #rest args #key castNum: lingo: dirInfo:->
- (
- local cast := dirInfo[@cast]
- local offPresenter := new TwoDShape boundary:cast[castNum].boundary
- local cName := findSXKey(lingo, "toggle")
- local onCast := castFromName(cName)
- local onPresenter := new TwoDShape boundary:onCast.boundary
- apply nextMethod self toggledOnPresenter:onPresenter \
- toggledOffPresenter:offPresenter args
- return self
- )
-
- method toggleOn self {class ClockToggle} ->
- (
- print "Toggle ON"
- local myScene := self.presentedBy
- for anim in myScene.players do
- play anim
- nextMethod self
- )
-
- method toggleOff self {class ClockToggle} ->
- (
- print "Toggle OFF"
- local myScene := self.presentedBy
- for anim in myScene.players do
- stop anim
- nextMethod self
- )
-
- #(ClockToggle,undefined,undefined)
-